<?php if (!defined('DB_PEREFIX')) exit;

global $_POST, $db, $GLOBAL_USER;

$arts = $db->num_rows ($db->query ("SELECT art_id FROM ".DB_PEREFIX."_articles"));
$cats = $db->num_rows ($db->query ("SELECT cat_id FROM ".DB_PEREFIX."_art_category"));
$users = $db->num_rows ($db->query ("SELECT user_id FROM ".DB_PEREFIX."_users"));
$com = $db->num_rows ($db->query ("SELECT com_id FROM ".DB_PEREFIX."_comments"));
$ban = $db->num_rows ($db->query ("SELECT * FROM ".DB_PEREFIX."_blacklist"));
$uban = $db->num_rows ($db->query ("SELECT * FROM ".DB_PEREFIX."_users WHERE user_ban = 'on'"));

/*
$query = $db->query ("SHOW TABLE STATUS FROM ".$dbname);
while ($row = $db->fetch_array ($query)) {
	$size += $row['Data_length'] + $row['Index_length'];
}
$size = $size / 1024;
$size = round ($size, 1)." Кб";
*/
print "<table width=\"100%\" class=\"main_text\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
<tr><td width=\"70%\">Статей:</td><td>$arts</td></tr>
<tr><td>Разделов статей:</td><td>$cats</td></tr>
<tr><td>Пользователей:</td><td>$users</td></tr>
<tr><td>Комментариев:</td><td>$com</td></tr>
<tr><td><font color=\"red\">Забаненых ip:</td><td>$ban</font></td></tr>
<tr><td><font color=\"red\">Забаненых польз.:</td><td>$uban</font></td></tr>
<tr><td colspan=\"2\">&nbsp;</td></tr>
<tr><td>Размер БД:</td><td>$size</td></tr>
</table>";

exit;

?>
